const pathContext = require.context('./modules', true, /[\w|-]+\.js$/);
const api = {};
pathContext.keys().forEach((key) => {
  const name = key.match(/\/(\w+)\.js/)[1];
  api[name] = pathContext(key).default;
});

export default api;
